home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 1996 #6
/
Amiga Plus CD - 1996 - No. 06.iso
/
pd
/
netz
/
dl
/
dl.h
< prev
next >
Wrap
C/C++ Source or Header
|
1992-09-02
|
2KB
|
89 lines
/* Copyright (C) 1995, 1996 Zlatko Calusic <maverick@fly.cc.fer.hr>
This file is part of DownLoad, FTP Client
The DownLoad is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
Software Foundation.
The DownLoad is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details.
You should have received a copy of the GNU General Public License along with
the DownLoad source; see the file COPYING. If not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <signal.h>
#include <netdb.h>
#ifdef AMIGA
#include <dos.h>
#else
#include <sys/uio.h>
#endif
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#if defined(ultrix)
# include <strings.h>
#else
# include <string.h>
#endif
#if defined(linux)
# include <linux/time.h>
#endif
#if defined(_AIX)
# include <sys/select.h>
#endif
#define PROGRAM "DownLoad"
#define VERSION "1.00"
#define AUTHOR "Zlatko Calusic"
#define EMAIL "<maverick@fly.cc.fer.hr>"
#define DATE "13 Feb 1996"
#define BUFFER 65536 /* transfer buffer */
#define TMOUT 600 /* timeout while reading socket (in seconds) */
#define MAXRETRY 50 /* max. number of tries */
/* Don't change these !!! */
#define ERROR 0
#define OK 1
extern int errno;
/* Function declarations */
void fperror(char *);
void fatal(char *);
void initialize(int, char **);
int download(void);
int retrieve_file(void);
int get_response(void);
int ftprequest(char *format, char *arg);
int establish_connection(void);
int get_port(void);
int accept_data(void);
int get_list(void);
void timer_on(int);
char *rate(int, int);
int parse(void);
int match(char *, char *, int);
int getlocalhost(void);